# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery do
  @moduledoc """
  IAM policy analysis query message.

  ## Attributes

  *   `accessSelector` (*type:* `GoogleApi.CloudAsset.V1.Model.AccessSelector.t`, *default:* `nil`) - Optional. Specifies roles or permissions for analysis. This is optional.
  *   `conditionContext` (*type:* `GoogleApi.CloudAsset.V1.Model.ConditionContext.t`, *default:* `nil`) - Optional. The hypothetical context for IAM conditions evaluation.
  *   `identitySelector` (*type:* `GoogleApi.CloudAsset.V1.Model.IdentitySelector.t`, *default:* `nil`) - Optional. Specifies an identity for analysis.
  *   `options` (*type:* `GoogleApi.CloudAsset.V1.Model.Options.t`, *default:* `nil`) - Optional. The query options.
  *   `resourceSelector` (*type:* `GoogleApi.CloudAsset.V1.Model.ResourceSelector.t`, *default:* `nil`) - Optional. Specifies a resource for analysis.
  *   `scope` (*type:* `String.t`, *default:* `nil`) - Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345"). To know how to get organization ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessSelector => GoogleApi.CloudAsset.V1.Model.AccessSelector.t() | nil,
          :conditionContext => GoogleApi.CloudAsset.V1.Model.ConditionContext.t() | nil,
          :identitySelector => GoogleApi.CloudAsset.V1.Model.IdentitySelector.t() | nil,
          :options => GoogleApi.CloudAsset.V1.Model.Options.t() | nil,
          :resourceSelector => GoogleApi.CloudAsset.V1.Model.ResourceSelector.t() | nil,
          :scope => String.t() | nil
        }

  field(:accessSelector, as: GoogleApi.CloudAsset.V1.Model.AccessSelector)
  field(:conditionContext, as: GoogleApi.CloudAsset.V1.Model.ConditionContext)
  field(:identitySelector, as: GoogleApi.CloudAsset.V1.Model.IdentitySelector)
  field(:options, as: GoogleApi.CloudAsset.V1.Model.Options)
  field(:resourceSelector, as: GoogleApi.CloudAsset.V1.Model.ResourceSelector)
  field(:scope)
end

defimpl Poison.Decoder, for: GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery do
  def decode(value, options) do
    GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
